﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RK.Model
{
    /// <summary>
    /// 云星空Api返回类
    /// </summary>
    public class ApiResult
    {
        public Result Result { get; set; }
    }
    public class Result
    {
        /// <summary>
        /// 
        /// </summary>
        public ResponseStatus ResponseStatus { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int Id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string Number { get; set; }

    }
    public class ResponseStatus
    {
        /// <summary>
        /// 是否成功
        /// </summary>
        public bool IsSuccess { get; set; }
        /// <summary>
        /// 错误代码
        /// </summary>
        public int ErrorCode { get; set; }
        /// <summary>
        /// 错误
        /// </summary>
        public List<ErrorsItem> Errors { get; set; }
        /// <summary>
        /// 成功后返回的实体
        /// </summary>
        public List<SuccessEntitysItem> SuccessEntitys { get; set; }
        /// <summary>
        /// 成功信息
        /// </summary>
        public List<string> SuccessMessages { get; set; }
        /// <summary>
        /// 信息代码
        /// </summary>
        public int MsgCode { get; set; }
    }
    public class SuccessEntitysItem
    {
        /// <summary>
        /// 单据内码
        /// </summary>
        public int Id { get; set; }
        /// <summary>
        /// 单据编号
        /// </summary>
        public string Number { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int DIndex { get; set; }
    }
    public class ErrorsItem
    {
        /// <summary>
        /// 错误列
        /// </summary>
        public string FieldName { get; set; }
        /// <summary>
        /// 错误信息
        /// </summary>
        public string Message { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int DIndex { get; set; }
    }
}
